import request from '@/utils/request'


//获取联系人信息  用户fromId
export function getRelationList(params) {
	return request({
		url: '/relationship/userList',
		method: 'get',
		params: params
	})
}

/*获取好友请求 未处理的  用户ID  {fromId:fromId}*/
export function getContactUntreated(params) {
	return request({
		url: '/relationship/contactUntreated',
		method: 'get',
		params: params
	})
}
/*获取新的朋友 用户ID  {fromId:fromId}*/
export function getContacts(params) {
	return request({
		url: '/relationship/contactList',
		method: 'get',
		params: params
	})
}
/*添加新的朋友 请求操作 用户ID  {userId:fromId ,otherId:otherId ,otherUsername:otherUsername ,otherUrl:otherUrl}*/
export function creatContacts(data) {
	return request({
		url: '/relationship/creatContact',
		method: 'post',
		data: data
	})
}

/*添加新好友 同意操作*/
export function ContactAgree(data) {
	return request({
		url: '/relationship/ContactAgree',
		method: 'post',
		data: data
	})
}
/**删除联系人*/
export function DeleteContact(data) {
	return request({
		url: '/relationship/DeleteContact',
		method: 'post',
		data: data
	})
}